package com.smartwebx.ha.usebean;
import java.io.Serializable;

import com.google.common.base.Objects;
/**
 * 
 * 创建人：Dream~天涯 
 * 创建时间：2015-4-22 上午11:25:00
 * 邮箱：154494796@qq.com
 * 备注：
 */
public class UserTreeNode implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4173238594098069041L;

	protected String id;
	protected Integer realId;
	protected String pid;
	protected String name;
	private String icon;
	private Boolean checked;
	private Integer reportType;

	public UserTreeNode(String id,Integer realId,String pid,String name, String icon, Boolean checked) {
		super();
		this.id = id;
		this.realId=realId;
		this.pid=pid;
		this.name = name;
		this.icon = icon;
		this.checked = checked;
	}
	
	public UserTreeNode(String id,Integer realId,String pid,String name, String icon, Integer reportType) {
		super();
		this.id = id;
		this.realId=realId;
		this.pid=pid;
		this.name = name;
		this.icon = icon;
		this.reportType = reportType;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public Integer getRealId() {
		return realId;
	}

	public void setRealId(Integer realId) {
		this.realId = realId;
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public Boolean getChecked() {
		return checked;
	}

	public void setChecked(Boolean checked) {
		this.checked = checked;
	}

	public Integer getReportType() {
		return reportType;
	}

	public void setReportType(Integer reportType) {
		this.reportType = reportType;
	}

	@Override
	public int hashCode() {
		return Objects.hashCode(id,realId,pid, name, icon);
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof UserTreeNode) {
			UserTreeNode other = (UserTreeNode) obj;
			return Objects.equal(id, other.id)
					&& Objects.equal(realId, other.realId)
					&& Objects.equal(pid, other.pid)
					&& Objects.equal(name, other.name)
					&& Objects.equal(icon, other.icon);
		} else {
			return false;
		}
	}

	@Override
	public String toString() {
		return Objects.toStringHelper(UserTreeNode.class).add("id", id)
				.add("realId", realId).add("pid", pid).add("name", name).add("icon", icon).toString();
	}
}
